<style>
    .select-text{
        width:220px;
    }
</style>
<?php
use yii\helpers\Html;
use common\components\helpers\Fun;
?>
    <div class="yx-radius2">
        <div id="search-area" class="yx-bgf7f7f7 yx-radius5 yx-function2 yx-pr0" style="height:68px;margin-bottom:15px;">
            <?=Html::beginForm()?>
            <?= \common\components\helpers\Search::textInput('name', null, ['label'=>'课程名称','class' => 'search  yx-width190 zx-lh24 yx-ml6']); ?>
            <?=\common\components\helpers\Search::dropDownList('cate_id',null,[],['label'=>'类别名称','promote'=>'请选择','class'=>'search diy_select_txt'])?>
            <?=Html::submitButton('搜索',['id'=>'search-handle','class'=>"yx-search yx-radius2"])?>
            <?=Html::endForm()?>
        </div>

        <div class="docs-main">
            <table id="tablesaw" class="tablesaw table yx-table1 yx-table3 table-striped with-check" >
                <thead>
                <tr class="yx-bgd2f6ec">
                    <th scope="checkbox">选择</th>
                    <th scope="name"><?=\Yii::t('zhtfrontend','课程名称');?></th>
                    <th scope="type_name"><?=\Yii::t('zhtfrontend','商品类型');?></th>
                    <th scope="store"><?=\Yii::t('zhtfrontend','库存总量');?></th>
                    <th scope="price"><?=\Yii::t('zhtfrontend','单节课次价');?></th>
                    <th scope="teacher_name"><?=\Yii::t('zhtfrontend','教师名称');?></th>
                    <th scope="classroom_name"><?=\Yii::t('zhtfrontend','教室');?></th>
                    <th scope="class_day"><?=\Yii::t('zhtfrontend','上课时间');?></th>
                    <th scope="max_number"><?=\Yii::t('zhtfrontend','满额人数');?></th>
                </tr>
                </thead>
                <tbody>
                  <?php foreach ($data as $item) { ?>
                   <tr>
                       <td><?=Html::radio('checkbox')?></td>
                       <td><?=$item['name']?></td>
                       <td><?=$item['type_name']?></td>
                       <td><?=$item['store']?></td>
                       <td><?=$item['price']?></td>
                       <td><?=$item['teacherStr']?></td>
                       <td><?=$item['room_name']?></td>
                       <td title="<?=$item['class_time']?>"><?=Fun::truncateUtf8String($item['class_time'],8)?></td>
                       <td><?=$item['class_count']?></td>
                   </tr>
                  <?php } ?>
                </tbody>
            </table>
        </div>
        <div align="right"><?= \common\components\widgets\GoPager::widget(['pagination' => $pages])?></div>
    </div>
